package com.ruoyi.facilities.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.facilities.mapper.TfWatergcMapper;
import com.ruoyi.facilities.domain.TfWatergc;
import com.ruoyi.facilities.service.ITfWatergcService;

/**
 * 废水治理设施Service业务层处理
 * 
 * @author yxf
 * @date 2021-08-10
 */
@Service
public class TfWatergcServiceImpl implements ITfWatergcService 
{
    @Autowired
    private TfWatergcMapper tfWatergcMapper;

    /**
     * 查询废水治理设施
     * 
     * @param wtfId 废水治理设施ID
     * @return 废水治理设施
     */
    @Override
    public TfWatergc selectTfWatergcById(Long wtfId)
    {
        return tfWatergcMapper.selectTfWatergcById(wtfId);
    }

    /**
     * 查询废水治理设施列表
     * 
     * @param tfWatergc 废水治理设施
     * @return 废水治理设施
     */
    @Override
    public List<TfWatergc> selectTfWatergcList(TfWatergc tfWatergc)
    {
        return tfWatergcMapper.selectTfWatergcList(tfWatergc);
    }

    /**
     * 新增废水治理设施
     * 
     * @param tfWatergc 废水治理设施
     * @return 结果
     */
    @Override
    public int insertTfWatergc(TfWatergc tfWatergc)
    {
        tfWatergc.setCreateTime(DateUtils.getNowDate());
        return tfWatergcMapper.insertTfWatergc(tfWatergc);
    }

    /**
     * 修改废水治理设施
     * 
     * @param tfWatergc 废水治理设施
     * @return 结果
     */
    @Override
    public int updateTfWatergc(TfWatergc tfWatergc)
    {
        tfWatergc.setUpdateTime(DateUtils.getNowDate());
        return tfWatergcMapper.updateTfWatergc(tfWatergc);
    }

    /**
     * 批量删除废水治理设施
     * 
     * @param wtfIds 需要删除的废水治理设施ID
     * @return 结果
     */
    @Override
    public int deleteTfWatergcByIds(Long[] wtfIds)
    {
        return tfWatergcMapper.deleteTfWatergcByIds(wtfIds);
    }

    /**
     * 删除废水治理设施信息
     * 
     * @param wtfId 废水治理设施ID
     * @return 结果
     */
    @Override
    public int deleteTfWatergcById(Long wtfId)
    {
        return tfWatergcMapper.deleteTfWatergcById(wtfId);
    }
}
